package com.coc.mapper;

import com.coc.pojo.Dept;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DeptMapper {

    @Insert("Insert into dept (name,db_source) values (#{name},database())")
    int addDept(Dept dept);
    @Delete("delete from dept where dept_no=#{deptNo}")
    int delete(Integer deptNo);

    @Select("Select * from dept")
    List<Dept> SelectAllDept();

}
